import React from 'react';
import { TouchableNativeFeedback } from 'react-native';
import { createDrawerNavigator, createStackNavigator } from 'react-navigation';
import { Icon } from 'react-native-elements';
import Inputs from './pages/Inputs';

const Drawer = createDrawerNavigator({
    Inputs
});

export default createStackNavigator({
    Drawer
}, {
        defaultNavigationOptions: ({ navigation }) => ({
            headerStyle: {
                backgroundColor: '#3f51b5'
            },
            title: '通用组件Demo',
            headerTitleStyle: {
                color: '#fff'
            },
            headerLeft:
                <Icon
                    component={TouchableNativeFeedback}
                    background={TouchableNativeFeedback.Ripple()}
                    type="entypo"
                    name="menu"
                    size={28}
                    iconStyle={{
                        marginLeft: 8,
                        padding: 8,
                        color: '#fff'
                    }}
                    onPress={() => navigation.toggleDrawer()}
                />
        })
    });

